home *** CD-ROM | disk | FTP | other *** search
/ New Perspectives on Computer Concepts / New Perspectives on Computer Concepts.iso / np2010c / page779.pag < prev    next >
Portable Network Graphic  |  2008-10-02  |  99KB  |  817x1045  |  8-bit (256 colors)
Labels: hakham | laptop | monitor | plant | window
OCR: COMPUTER PROGRAMMING 711 What happens when the completed pizza program runs? When you run the pizza program, it looks for the main( method This method dis- plays an on-screen prompt that asks for the pizza's shape. The getArea() method displays prompt for the pizza's diameter (for a round pizza) or the pizza's length and width (for rectangular pizza) similar series of prompts appears for the second pizza. The progr am concludes when the compare() method displays statement about which pizza the best deal. The software tour for Figure 12-41 lets you see what happens when the 00 pizza program runs Command Promp - FIGURE 12-41 When the pizza program Vava> java PizzaProgram runs, on-screen prompts Enter the shape of the first pizza: Round ask for the shape, size, and Enter the diameter of the f ...